<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class GoEz_Bootstrap</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class GoEz_Bootstrap</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Bootstrap 類別</p>
	<ul class="tags">
				<li><span class="field">copyright:</span> Copyright (c) 2008-2012 Wabow Information Inc. (http://www.wabow.com)</li>
				<li><span class="field">license:</span> New</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Bootstrap.php.html">/Bootstrap.php</a> (line <span class="field">18</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																																								<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$_config" title="details" class="var-name">$_config</a>
				</div>
																<div class="var-title">
					<span class="var-type"><a href="../GoEz/GoEz_Request.html">GoEz_Request</a></span>
					<a href="#$_request" title="details" class="var-name">$_request</a>
				</div>
																<div class="var-title">
					<span class="var-type"><a href="../GoEz/GoEz_Router.html">GoEz_Router</a></span>
					<a href="#$_router" title="details" class="var-name">$_router</a>
				</div>
																<div class="var-title">
					<span class="var-type"><a href="../GoEz/GoEz_Controller.html">GoEz_Controller</a></span>
					<a href="#$_userController" title="details" class="var-name">$_userController</a>
				</div>
																<div class="var-title">
					<span class="var-type"><a href="../GoEz/GoEz_View.html">GoEz_View</a></span>
					<a href="#$_view" title="details" class="var-name">$_view</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																				
												<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#run" title="details" class="method-name">run</a>
											(<span class="var-type">$configFile</span>&nbsp;<span class="var-name">$configFile</span>, <span class="var-type">$env</span>&nbsp;<span class="var-name">$env</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#_dispatch" title="details" class="method-name">_dispatch</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#_getUserAction" title="details" class="method-name">_getUserAction</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result"><a href="../GoEz/GoEz_Controller.html">GoEz_Controller</a></span>
										<a href="#_getUserController" title="details" class="method-name">_getUserController</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#_initRequest" title="details" class="method-name">_initRequest</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#_initRouter" title="details" class="method-name">_initRouter</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#_initView" title="details" class="method-name">_initView</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#_loadConfig" title="details" class="method-name">_loadConfig</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$configFile</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$env</span>)
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$_config" id="$_config"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$_config</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">27</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">設定</p>
<p class="description"><p>用來存放應用程式的設定</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_request" id="$_request"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type"><a href="../GoEz/GoEz_Request.html">GoEz_Request</a></span>
			<span class="var-name">$_request</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">45</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Request</p>
<p class="description"><p>用來處理 $_POST 與 $_GET</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_router" id="$_router"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type"><a href="../GoEz/GoEz_Router.html">GoEz_Router</a></span>
			<span class="var-name">$_router</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">36</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Router</p>
<p class="description"><p>存放解析網址後的 Controller 與 Action</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_userController" id="$_userController"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type"><a href="../GoEz/GoEz_Controller.html">GoEz_Controller</a></span>
			<span class="var-name">$_userController</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">169</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">使用者定義的 Controller</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_view" id="$_view"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type"><a href="../GoEz/GoEz_View.html">GoEz_View</a></span>
			<span class="var-name">$_view</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">54</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">View</p>
<p class="description"><p>用來輸出 Template 或是 JSON</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="methodrun" id="run"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">run</span> (line <span class="line-number">64</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">執行動作</p>
<p class="description"><p>派送 Action 至使用者定義的 Controller</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			run
		</span>
					(<span class="var-type">$configFile</span>&nbsp;<span class="var-name">$configFile</span>, <span class="var-type">$env</span>&nbsp;<span class="var-name">$env</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">$configFile</span>
				<span class="var-name">$configFile</span><span class="var-description">: 外部 INI 檔案路徑</span>			</li>
					<li>
				<span class="var-type">$env</span>
				<span class="var-name">$env</span><span class="var-description">: 應用程式執行環境</span>			</li>
				</ul>
		
			
	</div>
<a name="method_dispatch" id="_dispatch"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">_dispatch</span> (line <span class="line-number">185</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Dispatch</p>
<p class="description"><p>Dispatch 執行流程如下：</p><p><ol><li>找出目前網址選擇的 controller</li><li>將 config 轉交給 controller</li><li>將 request 轉交給 controller</li><li>將 view 轉交給 controller</li><li>執行 controller 的 init()</li><li>執行 controller 的 beforeDispatch()</li><li>執行目前網址選擇的 action</li><li>執行 controller 的 afterDispatch()</li></ol></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			_dispatch
		</span>
				()
			</div>
	
		
			
	</div>
<a name="method_getUserAction" id="_getUserAction"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">_getUserAction</span> (line <span class="line-number">223</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得使用者定義的動作</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Excetion</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			_getUserAction
		</span>
				()
			</div>
	
		
			
	</div>
<a name="method_getUserController" id="_getUserController"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">_getUserController</span> (line <span class="line-number">203</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得使用者定義的 Controller</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Excetion</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../GoEz/GoEz_Controller.html">GoEz_Controller</a></span>
		<span class="method-name">
			_getUserController
		</span>
				()
			</div>
	
		
			
	</div>
<a name="method_initRequest" id="_initRequest"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">_initRequest</span> (line <span class="line-number">146</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">初始化 Request</p>
<p class="description"><p>預設為 GoEz_Request</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			_initRequest
		</span>
				()
			</div>
	
		
			
	</div>
<a name="method_initRouter" id="_initRouter"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">_initRouter</span> (line <span class="line-number">135</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">初始化 Router</p>
<p class="description"><p>預設用 GoEz_Router_Rewrite 來解析網址，格式為：</p><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-id">http</span>:<span class="src-comm">//xxx/baseurl/controller/action</span></div></li>
</ol></div></p><p>controller 和 action 都是 index 的話，就不需要寫在網址上，例如：</p><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-id">http</span>:<span class="src-comm">//xxx/baseurl/</span></div></li>
</ol></div></p><p>但如果 action 不為 index ，而 controller 為 index ，那麼就要寫上 controller ，例如：</p><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-id">http</span>:<span class="src-comm">//xxx/baseurl/index/action</span></div></li>
</ol></div></p><p>如果採用 GoEz_Router 來解析網址的話，格式為：</p><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-id">http</span>:<span class="src-comm">//xxx/baseurl/?controller=xxx&amp;action=yyy</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			_initRouter
		</span>
				()
			</div>
	
		
			
	</div>
<a name="method_initView" id="_initView"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">_initView</span> (line <span class="line-number">158</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">初始化 View</p>
<p class="description"><p>GoEz_View 採用 Smarty 2.6 當做 Render engine ，  在這裡初始化時，會預先把 baseUrl 放在 $frontendVars 這個樣版陣列變數裡</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			_initView
		</span>
				()
			</div>
	
		
			
	</div>
<a name="method_loadConfig" id="_loadConfig"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">_loadConfig</span> (line <span class="line-number">95</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">載入網址設定檔</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			_loadConfig
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$configFile</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$env</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$configFile</span><span class="var-description">: 外部檔案路徑</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$env</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Wed, 25 Nov 2009 12:51:03 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.1</a>
	</p>
	</div></body>
</html>